package com.wondersgroup.core.model;

import javax.persistence.*;

public class Region {

    /**
     * 行政级别,  1-省/直辖市
     */
	public static int ADMIN_LEVEL_PROVINCE =  1;

    /**
     * 行政级别,  2-市
     */
	public static int ADMIN_LEVEL_CITY =  2;

    /**
     * 行政级别, 3-区/县
     */
	public static int ADMIN_LEVEL_COUNTY =  3;

    /**
     * 行政级别,  4-乡镇/街道
     */
	public static int ADMIN_LEVEL_STREET =  4;

    /**
     * 行政级别,  5-分所
     */
	public static int ADMIN_LEVEL_BRANCH =  5;
	
    @Id
    @Column(name = "ID")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 名称
     */
    @Column(name = "NAME")
    private String name;

    /**
     * 上级行政地理区划ID
     */
    @Column(name = "PARENT_ID")
    private Integer parentId;

    /**
     * 行政级别,  1-省/直辖市, 2-市, 3-区/县, 4-乡镇/街道, 5-分所
     */
    @Column(name = "ADMIN_LEVEL")
    private Integer adminLevel;

    @Column(name = "CODE")
    private String code;

    /**
     * @return ID
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取名称
     *
     * @return NAME - 名称
     */
    public String getName() {
        return name;
    }

    /**
     * 设置名称
     *
     * @param name 名称
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取上级行政地理区划ID
     *
     * @return PARENT_ID - 上级行政地理区划ID
     */
    public Integer getParentId() {
        return parentId;
    }

    /**
     * 设置上级行政地理区划ID
     *
     * @param parentId 上级行政地理区划ID
     */
    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    /**
     * 获取行政级别,  1-省/直辖市, 2-市, 3-区/县, 4-乡镇/街道, 5-分所
     *
     * @return ADMIN_LEVEL - 行政级别,  1-省/直辖市, 2-市, 3-区/县, 4-乡镇/街道, 5-分所
     */
    public Integer getAdminLevel() {
        return adminLevel;
    }

    /**
     * 设置行政级别,  1-省/直辖市, 2-市, 3-区/县, 4-乡镇/街道, 5-分所
     *
     * @param adminLevel 行政级别,  1-省/直辖市, 2-市, 3-区/县, 4-乡镇/街道, 5-分所
     */
    public void setAdminLevel(Integer adminLevel) {
        this.adminLevel = adminLevel;
    }

    /**
     * @return CODE
     */
    public String getCode() {
        return code;
    }

    /**
     * @param code
     */
    public void setCode(String code) {
        this.code = code;
    }
}